import 'package:fluent_ui/fluent_ui.dart';

import '../gyy_theme.dart';

class MyMenuItem extends StatefulWidget {
  const MyMenuItem({Key? key}) : super(key: key);

  @override
  State<MyMenuItem> createState() => _MenuItemState();
}

class _MenuItemState extends State<MyMenuItem> {
  bool checked1 = false;
  bool checked2 = false;
  bool checked3 = false;
  bool checked4 = false;

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Row(children: [
      Expanded(
        child: ToggleButton(
          child: const Text('PVC板'),
          checked: checked1,
          onChanged: (v) => setState(() => checked1 = v),
        ),
      ),
      sizeBoxH1,
      Expanded(
        child: GyyToggleButton(
          '塑料板',
          checked2,
              (v) {
            checked2 = v;
            setState(() {});
          },
        ),
      ),
      sizeBoxH1,
      Expanded(
        child: GyyToggleButton(
          '有机玻璃',
          checked3,
          (v) {
            checked3 = v;
            setState(() {});
          },
        ),
      ),
      sizeBoxH1,
      Expanded(
        child: GyyToggleButton(
          '特殊材料',
          checked4,
          (v) {
            checked4 = v;
            setState(() {});
          },
        ),
      ),
    ]);
  }
}
